<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<HTML
><HEAD
><TITLE
>mat_copy</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.79"><LINK
REL="HOME"
TITLE="LIBIT Documentation"
HREF="index.html"><LINK
REL="UP"
HREF="refmanual.html"><LINK
REL="PREVIOUS"
TITLE="cmat_ones"
HREF="man.cmat-ones.html"><LINK
REL="NEXT"
TITLE="imat_copy"
HREF="man.imat-copy.html"></HEAD
><BODY
CLASS="REFENTRY"
BGCOLOR="#FFFFFF"
TEXT="#000000"
LINK="#0000FF"
VLINK="#840084"
ALINK="#0000FF"
><DIV
CLASS="NAVHEADER"
><TABLE
SUMMARY="Header navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TH
COLSPAN="3"
ALIGN="center"
>LIBIT Documentation</TH
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="man.cmat-ones.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
></TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="man.imat-copy.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><H1
><A
NAME="MAN.MAT-COPY"
></A
>mat_copy</H1
><DIV
CLASS="REFNAMEDIV"
><A
NAME="AEN6656"
></A
><H2
>Name</H2
>mat_copy&nbsp;--&nbsp;Copy matrix elements to another</DIV
><DIV
CLASS="REFSYNOPSISDIV"
><A
NAME="AEN6659"
></A
><H2
>Synopsis</H2
><DIV
CLASS="FUNCSYNOPSIS"
><P
></P
><A
NAME="AEN6660"
></A
><PRE
CLASS="FUNCSYNOPSISINFO"
>#include &lt;it/mat.h&gt;
      </PRE
><P
><CODE
><CODE
CLASS="FUNCDEF"
>void mat_copy</CODE
>( mat dest, mat orig
        );</CODE
></P
><P
></P
></DIV
></DIV
><H2
>DESCRIPTION</H2
><P
> The function <CODE
CLASS="FUNCTION"
>mat_copy</CODE
> copies elements from <CODE
CLASS="PARAMETER"
>orig</CODE
> to matrix <CODE
CLASS="PARAMETER"
>dest</CODE
>. Matrix <CODE
CLASS="PARAMETER"
>dest</CODE
> must have same or greater dimensions than <CODE
CLASS="PARAMETER"
>orig</CODE
>. If <CODE
CLASS="PARAMETER"
>dest</CODE
> is bigger than <CODE
CLASS="PARAMETER"
>orig</CODE
>, elements are copied to <CODE
CLASS="PARAMETER"
>dest</CODE
> starting from [0,0].  </P
><H2
>RETURN VALUE</H2
><P
>    void
   </P
><H2
>EXAMPLE</H2
><PRE
CLASS="PROGRAMLISTING"
>&#13;#include &lt;mat.h&gt;

...

mat m1 = mat_new_zeros (2,2); 
mat m2 = mat_new (3,3);

mat_set (m2,1.); 

mat_copy (m2,m1); 

/*
m2 = 
[[ 0   0   1 ] 
 [ 0   0   1 ]
 [ 1   1   1 ]]
*/</PRE
><DIV
CLASS="NAVFOOTER"
><HR
ALIGN="LEFT"
WIDTH="100%"><TABLE
SUMMARY="Footer navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="man.cmat-ones.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="index.html"
ACCESSKEY="H"
>Home</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="man.imat-copy.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>cmat_ones</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="refmanual.html"
ACCESSKEY="U"
>Up</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>imat_copy</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>